POV-Ray : Newsgroups : povray.unofficial.patches : SuperPatch / triangle mesh : Re: SuperPatch / triangle mesh Server Time
2 Nov 2024 15:25:25 EDT (-0400)
  Re: SuperPatch / triangle mesh  
From: Mick Hazelgrove
Date: 1 Jul 1999 02:38:35
Message: <377b0ceb@news.povray.org>
I've been having similar problems with a wide range of triangle meshes, from
a variety of programs and pov code.

Poser and organica files seem to be immune.

Mick

edna dornblazer <hac### [at] geocitiescom> wrote in message
news:377### [at] geocitiescom...
> in SuperPatch version of parse.c, in the function
> Parse_Mesh(), there is the line
> number_of_vertices=0;
>
> then in parsing of 'plain' (non-smooth) triangles,
> nothing is done to number_of_vertices.
> Looking down at the smooth_triangle mesh code,
> number_of_vertices is set for smooth_triangles
> by calling
> Mesh_Hash_Vertex(&number_of_vertices,
> &max_vertices,
> &Vertices, P1);
> but Mesh_Hash_Vertex(&number_of_vertices,...) is
> not called for plain triangles.
>
> But then later there is:
> Object->Data->Vertices =
>           (SNGL_VECT
> *)POV_MALLOC(number_of_vertices*sizeof(SNGL_VECT),     "triangle mesh
> data");
>
> and POV-Ray stops for trying to malloc zero bytes.
>
> Now, what I did, and it is working, is just stick in some
> Mesh_Hash_Vertex(&number_of_vertices,
> &max_vertices,
> &Vertices, P1);
> for plain triangles.
>
> Comments / condemnations ??


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.